import instance from "@/tools/axios";

const getCarServiceDetail = (id: string) => {
  return instance.get("/SysCarServices/Detail", { id });
};

const getCarServiceByCarShopId = (params: any) => {
  return instance.get("/SysCarServices/Pagination", params);
};

const addCarService = (data: any) => {
  return instance.post("/SysCarServices/Add", data, {
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};

const updateCarService = (data: any) => {
  return instance.post("/SysCarServices/Update", data, {
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};

const deleteCarService = (id: number) => {
  return instance.post("/SysCarServices/Delete", { id });
};

export {
  getCarServiceDetail,
  getCarServiceByCarShopId,
  addCarService,
  updateCarService,
  deleteCarService,
};
